<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    	               "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<head>
		<link href="Standard.css" rel="stylesheet" type="text/css">
	  	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	  	<title>Home</title>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script type="text/javascript">
      var map;
      function initialize() {
        var mapOptions = {
          zoom: 1,
          draggable: false,
          panControl: true,
          center: new google.maps.LatLng(39.504041,-96.956542),
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };
        map = new google.maps.Map(document.getElementById('googleMapDiv'),
            mapOptions);
        google.maps.event.addListener(map, 'click', function(event) {
            updateLatLng(event.latLng.lat(), event.latLng.lng());
          });
      }
      
      function updateLatLng(lat, lng) {
    	  document.getElementById('latitudeTextBox').value = lat;
    	  document.getElementById('longitudeTextBox').value = lng;
      }

      google.maps.event.addDomListener(window, 'load', initialize);
      </script>
	</head>
	<body>
	<%@ page import="java.util.*" %>
	<%@ page import="jpa.*" %>
	<%@ page import="javax.naming.*" %>
	<%@include file="header.jsp" %>
		<% 
		List<Member> m = stateless.getAllMembers();
		List<Cache> c = stateless.getAllCaches();
		
		%>
		
		<div id = "container">
			<div id="admin">
				<div id="newCache">
					<h2>Create New Cache</h2>
					
					<form enctype="multipart/form-data" method="post" action="Controller?do=createCache">
				 		<label class="adminLabel">CacheName: </label><input class="adminTextBox" type="text" name="cacheName" id="cacheName"/><br class="clearBoth"/>
				 		<label class="adminLabel">Description: </label><textarea class="adminTextAreaBox" name="cacheDescription" id="cacheDescription"> </textarea><br class="clearBoth"/>
				 		<label class="adminLabel">Latitude: </label><input class="adminTextBox" type="text" name="latitudeTextBox" id="latitudeTextBox"/><br class="clearBoth"/>
				 		<label class="adminLabel">Longitude: </label><input class="adminTextBox" type="text" name="longitudeTextBox" id="longitudeTextBox"/><br class="clearBoth"/>
				 		<label class="adminLabel">Photo: </label> <input name="file" type="file"/> <br class="clearBoth"/>
				 		<div id="googleMapDiv">
				 		</div>
				 		<br class="clearBoth"/>
				 		<input type="submit" value="Finished">
				 		
						
				 	</form>
			 	</div>
		 	</div>
	 	</div>		 	




</body>
</html>